package com.example.feign.feign.fallback;

import com.example.feign.entity.Type;
import com.example.feign.feign.TypeFeign;
import com.example.feign.util.Response;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class TypeFallback implements TypeFeign {
    @Override
    public Response getType(Integer page, Integer size, Map map) {
        Response response = new Response();
        response.setMsg("服用调用失败");
        response.setStatus(500);
        response.setData(null);
        return response;
    }

    @Override
    public Response getAllType() {
        Response response = new Response();
        response.setMsg("服用调用失败");
        response.setStatus(500);
        response.setData(null);
        return response;
    }

    @Override
    public Response addType(Type type) {
        Response response = new Response();
        response.setMsg("服用调用失败");
        response.setStatus(500);
        response.setData(null);
        return response;
    }

    @Override
    public Response updateType(Type type) {
        Response response = new Response();
        response.setMsg("服用调用失败");
        response.setStatus(500);
        response.setData(null);
        return response;
    }

    @Override
    public Response delType(String typeId) {
        Response response = new Response();
        response.setMsg("服用调用失败");
        response.setStatus(500);
        response.setData(null);
        return response;
    }
}
